package http

import (
	"github.com/swaggo/gin-swagger/swaggerFiles"
	"zin/app/http/module/user"
	"zin/config"
	"zin/framework/gin"
	"zin/framework/middlewares"
	ginSwagger "zin/framework/middlewares/gin-swagger/swaggerFiles"
)

func Routes(r *gin.Engine) {
	r.Use(middlewares.Trace)

	//demo模块路由注册
	user.Register(r)

	if config.Conf.Swag.Enable {
		r.GET(config.Conf.Swag.Router, ginSwagger.WrapHandler(swaggerFiles.Handler))
	}
}
